import request from '@/utils/request'

/**
 * 登录返回token
 * @param {*} loginForm 
 * @returns 
 */
export function login(loginForm){
  return request({
    url:'/login',
    method: 'post',
    data: loginForm,
    // headers: {
    //   "Content-Type": "application/x-www-form-urlencoded"
    // }
  })
}

/**
 * 获取登录用户信息
 */
export function loginInfo(){
  return request({
    url: '/login/info',
    method: 'get'
  })
}

/**
 * 退出登录
 */
export function logout(){
  return request({
    url:'/logout',
    mehtod: 'post',
  })
}

